<template>
	<el-main>
		<el-input ref="express" v-model="express_number" placeholder="请输入快递单号" @change="scanChange"  clearable></el-input>
	</el-main>
</template>

<script>
	export default {
		data() {
			return {
				express_number: "",
			}
		},
		mounted() {
			this.$nextTick(() => {
                this.$refs.express.focus();
            })
		},
		methods: {


			async scanChange() {
				console.log(this.express_number);
				var data = {
					express_number: this.express_number
				}
				var res = await this.$API.refund.scanExpress.post(data)

				if (res.code == 200) {
					this.$message.success("操作成功")
				} else {
					this.$message.error(res.message)
				}

				this.express_number = "";
			}
		}
	}
</script>

<style>
</style>
